const Koa=require("koa");
const app=new Koa();
const cors=require("koa-cors");
const router=require("koa-router")();
const mainRouter=require('./routers/index')
const searchRouter=require('./routers/search')
// 挂载跨域中间件
app.use(cors());
app.use(mainRouter);
router.use('/search',searchRouter);
app.use(router.routes());

app.listen(3011,()=>{
    console.log("app running")
})
